| Conditions | 1 |
| Paths | 0 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | import { ACTION_TYPES } from './constants'; |
||
| 3 | export default ({ locationParser, immutable }) => (state = immutable ? require('immutable').fromJS({}) : {}, { type, payload }) => { |
||
| 4 | |||
| 5 | if (type === ACTION_TYPES.LOCATION_CHANGED) { |
||
| 6 | |||
| 7 | const result = locationParser(payload); |
||
| 8 | |||
| 9 | return immutable ? require('immutable').fromJS(result) : result; |
||
| 10 | } |
||
| 11 | |||
| 12 | return state; |
||
| 13 | }; |